<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<script src="../../plugins/jquery-2.1.0.js"></script>
		<script src="../../plugins/element-ui/vue.js"></script>
		<script src="../../plugins/element-ui/index.js"></script>
		<title></title>
	</head>

	<body>
		<button id="openCount">开始计算</button> 第一个数
		<input type="number" id="num1" /> 符号
		<input type="text" id="count" /> 第二个数
		<input type="number" id="num2" /> 结果
		<input type="text" id="result" />
		<script>
			$("#openCount").on('click', function() {
				var n1 = $("#num1").val();
				var n2 = $("#num2").val();
				var cn = $("#count").val();
		switch (cn){
			case "+":
			$("#result").val(n1+n2);
				break;
			case "*":
			$("#result").val(n1*n2);
				break;	
			case "/":
			$("#result").val(n1/n2);
				break;	
			default:
				break;
		}
			})
		</script>
	</body>

</html>